Google News
logo
jQuery - Interview Questions
What is the use of html() method in JQuery?
The jQuery html() method is used to change the entire content of the selected elements. It replaces the selected element content with new contents.
 
Syntax :

$(document).ready(function(){    
    $("button").click(function(){    
        $("p").html("Hello <b>freetimelearning.com</b>");    
    });    
});​
    
Advertisement